

export const commonElementProperties = {
    backgroundImage: {
        type: 'array',
        title: '上传背景',
        'x-decorator': 'FormItem',
        'x-component': 'Upload',
        'x-component-props': {
            listType: 'picture-card',
            action: 'https://formily-vue.free.beeceptor.com/file',
        },
        required: false,
    },
    backgroundColor: {
        type: 'string',
        title: '背景颜色',
        'x-decorator': 'FormItem',
        'x-component': 'PickerInput',
        'x-component-props': {
            style: {
                width: 200
            }
        },
        required: false,
    },
    gridBackground: {
        type: 'void',
        'x-component': 'FormGrid',
        'x-component-props': {
            minColumns: 0,
            columnGap: 20,
            strictAutoFit: true
        },
        properties: {
            backgroundRepeatX: {
                type: 'boolean',
                title: 'X重复',
                'x-decorator': 'FormItem',
                'x-component': 'Switch',
            },
            backgroundAttachment: {
                type: 'boolean',
                title: '图片定位',
                'x-decorator': 'FormItem',
                'x-component': 'Switch',
            },
            backgroundRepeatY: {
                type: 'boolean',
                title: 'Y重复',
                'x-decorator': 'FormItem',
                'x-component': 'Switch',
            },

            backgroundClip: {
                type: 'boolean',
                title: '图片裁剪',
                'x-decorator': 'FormItem',
                'x-component': 'Switch',

            },
        },
    },
    position: {
        type: 'void',
        title: '图片位置',
        'x-decorator': 'FormItem',
        'x-decorator-props': {
            feedbackLayout: 'none',
            display:'none'
        },
        'x-component': 'Space',
        properties: {
            backgroundPositionX: {
                type: 'string',
                'x-decorator': 'FormItem',
                'x-component': 'Input',
            },
            backgroundPositionY: {
                type: 'string',
                'x-decorator': 'FormItem',
                'x-component': 'Input',
            },
        }
    },
    opacity: {
        type: 'number',
        title: '透明度',
        'x-decorator': 'FormItem',
        'x-component': 'ElSlider',
        'x-component-props': {
            // showInput:true,
            formatTooltip: function formatTooltip(params) {
                return params / 100
            },
            showInput:true
        },

    },
    gridXandY: {
        type: 'void',
        'x-component': 'FormGrid',
        'x-component-props': {
            minColumns: 0,
        },
        properties: {
            width: {
                type: 'number',
                title: '宽',
                'x-decorator': 'FormItem',
                'x-component': 'InputButton',

            },
            height: {
                type: 'number',
                title: '高',
                'x-decorator': 'FormItem',
                'x-component': 'InputButton',

            },
        }
    },

    // isLock: {
    //     type: 'boolean',
    //     title: '锁定宽高',
    //     'x-decorator': 'FormItem',
    //     'x-component': 'Switch',
    //     
    // },

}